package cn.com.klun.tjy.task.test;


import cn.com.klun.inter.ITask;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * Created by baolong on 2016/3/22.
 */
public class SIMPLE_TESTS {
    private static ApplicationContext context;
//pushRiskTask、LcOrderOverTask、updateProductStateTask、advertTask
	public static void main(String[] args) {
        context = new ClassPathXmlApplicationContext(new String[] {"classpath:spring.xml"});
        ITask istep = (ITask)context.getBean("advertTask");
        List list = istep.queryTaskInfo(null);
        if(!CollectionUtils.isEmpty(list)){

            for(Object info : list ){
                istep.runTask(info);
            }
        }
    }
}
